package https

func CompareSet(a []string, b []string) (aMb []string, bMa []string, aNb []string) {
	for _, x := range a {
		for _, z := range b {
			if x == z {
				aNb = append(aNb, x)
				break
			}
		}
	}

	for _, x := range a {
		exist := false
		for _, z := range aNb {
			if x == z {
				exist = true
				break
			}
		}
		if !exist {
			aMb = append(aMb, x)
		}
	}

	for _, x := range b {
		exist := false
		for _, z := range aNb {
			if x == z {
				exist = true
				break
			}
		}
		if !exist {
			bMa = append(bMa, x)
		}
	}
	return
}
